from django.db.models import *

_markup_choices = (
	(1, "HTML"),
	(2, "plain text"),
	(3, "Markdown"),
	(4, "reStructuredText"),
	(5, "Textile"),
)

class Page(Model):
	title = CharField(max_length = 32)
	slug = SlugField(unique = True)
	markup = PositiveSmallIntegerField(choices = _markup_choices)
	content = TextField()
	show_in_menu = BooleanField(default = False)
	def __unicode__(self):
		return self.title
	@permalink
	def get_absolute_url(self):
		return ("page-detail", (), { "slug" : self.slug })
